package com.ymatou.iapi.liveseller.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.liveseller.parameter.CreateSellerPreVideoBean;
import com.ymatou.iapi.liveseller.parameter.SellerPreVideoInfoBean;
import com.ymatou.iapi.liveseller.service.SellerPreVideoInfoCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.LiveRoomCallService;
import com.ymttest.database.mapping.GodProductActivityStockMapper;
/**
*查询预告Test
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_SellerPreVideoInfo{
	private static SellerPreVideoInfoBean sellerprevideoinfoBean;
	private static SellerPreVideoInfoCall sellerprevideoinfoCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("查询预告Test");
	}

	@Before
	public void caseUp() {
		sellerprevideoinfoBean=new SellerPreVideoInfoBean();
		sellerprevideoinfoCall=new SellerPreVideoInfoCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(sellerprevideoinfoCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_SellerPreVideoInfo_001() {
		Logger.start(true, "查询预告");
		try {

			CreateSellerPreVideoBean createsellerprevideoBean = LiveRoomCallService.initCreatesellerPreVideoBean(null);
			LiveRoomCallService.CreatesellerPreVideo(createsellerprevideoBean);
			sellerprevideoinfoBean.setUserId(createsellerprevideoBean.getPreVideoDto().getUserId());
			sellerprevideoinfoCall.setData(sellerprevideoinfoBean);
			sellerprevideoinfoCall.callService();

			Logger.verifyEquals("200", sellerprevideoinfoCall.getString("code"), "验证code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}